package cc;

//鸟继承动物类,且能够飞
public class Bird extends Animal implements IFlyable{

    public Bird(String name, int age) {
//        super(name, age)用于调用父类Animal的构造函数
        super(name, age);
    }

    @Override
    public void move() {
        fly();
    }


    @Override
    public void makeSound() {
        System.out.println("Singing sound");
    }

    //接口里面的方法要重写
    @Override
    public void fly() {
        System.out.println("Flying");
    }
}
